package com.pets.springboot_petshop.config;

import com.pets.springboot_petshop.common.Cross;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;
/**
 * @author wxk
 * @Email: 2089967794@qq.com
 * @Date: 2024/10/12 下午5:42 周六
 * * @remark 跨域配置类
 */
@Configuration
public class CrossConfig implements WebMvcConfigurer {
    @Resource
    private Cross cross;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(cross);
    }
}
